home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_100 / 163_01 / rindex.c < prev   
Text File  |  1988-01-30  |  384b  |  13 lines

  1. /*
  2. ** return pointer to the last occurrence of c in s
  3. */
  4. rindex(s, c) char *s, c; {
  5.   char *rindex;
  6.   rindex = 0;
  7.   while(*s) {
  8.     if(*s == c) rindex = s;
  9.     s++;
  10.     }
  11.   return rindex;
  12.   }
  13.